/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.threads.lista;

/**
 *
 * @author andersonribeiro
 */
public class Questao3 implements Runnable {

    public void run() {

        for (int i = 0; i < 1000; i++) {
            System.out.println("Número: " + i);
        }

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            System.out.println("Stop!");
        }

    }

    public static void main(String[] args) {

        Questao3 t1 = new Questao3();
        Questao3 t2 = new Questao3();

        Thread thread1 = new Thread(t1);
        Thread thread2 = new Thread(t2);

        thread1.start();
        thread2.start();

    }
}
